package com.maigao.entity.jpa;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Entity
@Table(name = "tb_coach")
@DynamicInsert
@DynamicUpdate
public class Coach implements Serializable {

    public enum Status{
        NORMAL(0), DISABLED(-1);
        Status(int value) {
            this.value = value;
        }
        private int value;

        public int getValue() {
            return value;
        }
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "user_uid")
    private String userUid;

    @Column(name = "coach_name")
    private String coachName;

    @Column(name = "mobile")
    private String mobile;

    @Column(name = "status")
    private Integer status;

    @Column(name = "create_time")
    private LocalDateTime createTime;


}
